﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="AMV.WEB.admin.List" Theme="basic" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="resources/jquery-1.6.2.min.js" type="text/javascript"></script>
    <link href="resources/yui-reset-min.css" rel="stylesheet" type="text/css" />
    <link href="resources/basic-control.css" rel="stylesheet" type="text/css" />
    <link href="resources/grid-view.css" rel="stylesheet" type="text/css" />
    <script src="resources/grid-view.js" type="text/javascript"></script>
    <link href="resources/edit-view.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        
        body
        {
            padding: 10px;
        }
        
        
    </style>
    <script type="text/javascript">
        $(function () {
            var queryFilterTitle = $('.query-filter .title');
            var queryFilterBody = $('.query-filter .body');

            queryFilterTitle.click(function () {
                queryFilterBody.toggleClass('body-hidden');
                if (queryFilterBody.hasClass('body-hidden')) {
                    queryFilterBody.slideUp('fast');
                } else {
                    queryFilterBody.slideDown('fast');
                }
            });

            queryFilterTitle.html(queryFilterTitle.html() + '<span class="tips">点击这里显示/隐藏条件筛选</span>');
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">

    <div class="edit-view query-filter">
        <div class="title">
            查询学生
        </div>
        <div class="body">
            <table>
                <tr>
                    <td width="100">
                        学号</td>
                    <td>
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    </td>
                    <td width="100">
                        状态</td>
                    <td>
                        <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        姓名</td>
                    <td>
                        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        年龄</td>
                    <td>
                        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="Button1" runat="server" Text="查询" />
                    </td>
                    <td colspan="2" align="right">
                        <asp:Button ID="Button2" runat="server" Text="导出" />
                    </td>
                </tr>
            </table>
            
        </div>
    </div>

    <asp:GridView CssClass="grid-view-default" ID="GridView1" runat="server" AutoGenerateColumns="False"
        CellPadding="0" DataKeyNames="LoginName" DataSourceID="SqlDataSource1" GridLines="None"
        Width="100%" AllowPaging="True" PageSize="2">
        <Columns>
            <asp:TemplateField HeaderText="选择">
                <HeaderTemplate>
                    <asp:CheckBox ID="chkdAll" runat="server" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="chkItem" runat="server" />
                </ItemTemplate>
                <HeaderStyle CssClass="check-header" />
                <ItemStyle CssClass="check-item" />
            </asp:TemplateField>
            <asp:BoundField DataField="UserID" HeaderText="编号" InsertVisible="False" ReadOnly="True"
                SortExpression="UserID" />
            <asp:BoundField DataField="LoginName" HeaderText="登录名" ReadOnly="True" 
                SortExpression="LoginName" />
            <asp:BoundField DataField="Password" HeaderText="密码" 
                SortExpression="Password" />
            <asp:CheckBoxField DataField="Status" SortExpression="Status" HeaderText="状态" />
            <asp:TemplateField HeaderText="操作" ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="lbtnDel" OnClientClick="return confirm('确定要删除该条数据吗？');" runat="server" CausesValidation="False" 
                        CommandName="Delete">
                        <asp:Image ID="imgDel" runat="server" ImageUrl="~/admin/resources/icons/109.gif" /></asp:LinkButton>

                </ItemTemplate>
                <HeaderStyle CssClass="opts-header" />
                <ItemStyle CssClass="opts-item" />
            </asp:TemplateField>
        </Columns>
        <AlternatingRowStyle CssClass="stripped" />
        <PagerStyle CssClass="pager" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=JINHAOXIA-DELL;Initial Catalog=master;Integrated Security=True"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT [UserID], [LoginName], [Password], [Status] FROM [User]">
    </asp:SqlDataSource>
    </form>
</body>
</html>
